package com.leyou.item.api;

import com.leyou.item.pojo.SpecGroup;
import com.leyou.item.pojo.SpecParam;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;


public interface SpecApi {
    //查询分组参数
    @GetMapping("/spec/params")
    List<SpecParam> querySpecParam(@RequestParam(value = "gid", required = false) Long gid,
                                   @RequestParam(value = "cid", required = false) Long cid,
                                   @RequestParam(value = "searching",required = false) Boolean searching,
                                   @RequestParam(value = "generic" ,required = false) Boolean generic);

    //根据分类的id查询规格组，规格组中有规格参数数组
    @GetMapping("/spec/groups/{cid}")
   List<SpecGroup> querySpecGroups(@PathVariable("cid") Long id);


}
